package adv4;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileINputTest {

    public static void main(String[] args) {

      FileInputStream fin=null;
        try {
            fin = new FileInputStream("D:\\tmp\\java86\\花名册.txt");
            int ch = 0;
//            ch=fin.read();
//            ch!=-1
            while ((ch = fin.read()) != -1) {
                //System.out.print(ch+" ");
                System.out.print((char)ch);
            }
            fin.close();//有隐患
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
